/**
 *
 * 泛型约束
 */
class Container<T extends object> {
  t!: T;

  constructor(_t: T) {
    this.t = _t;
  }

  show() {
    console.log("show t", this.t);
  }
}

let obj = { name: "zhangshan", age: 18 };

let c = new Container(obj);

c.show()

// let c2 = new Container('eee');// ! at createTSError 泛型约束了 错误

// c2.show()

export {};
